package org.nnxy.foodboot.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * OpenAPI (Swagger) 配置
 */
@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI foodSystemOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("食谱系统API文档")
                        .description("食谱系统的API接口文档，包含用户管理、食谱管理、统计分析等功能")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("开发团队")
                                .email("dev@example.com"))
                        .license(new License()
                                .name("使用协议")
                                .url("https://example.com/license")));
    }
} 